package com.cheyun.netsalev3.view.cluefollowup


import android.util.Log
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProviders
import com.cheyun.netsalev3.R
import com.cheyun.netsalev3.databinding.FragmentWaitStockBinding
import com.cheyun.netsalev3.utils.BaseFragment
import com.cheyun.netsalev3.viewmodel.ClueFollowUpActivityViewModel
import kotlinx.android.synthetic.main.head_layout.view.*

/**
 * 等待库存入库
 */
class WaitStockFragment : BaseFragment<FragmentWaitStockBinding>() {
    override fun initContentView(): Int {
        return R.layout.fragment_wait_stock
    }

    override fun initViewModel(): ViewModel? {
        activity?.apply {
            return ViewModelProviders.of(this).get(ClueFollowUpActivityViewModel::class.java)
        }
        return super.initViewModel()
    }

    override fun initView() {


    }

    override fun initData() {
        binding.headview?.leftBut.setOnClickListener {
            binding.viewModel?.clickLeft(it)
        }
        binding.viewModel?.stockBtnEnable?.observe(this, Observer {
            binding.nexBut.isEnabled = it
        })
    }

    override fun lazyInit() {
        Log.i("WaitStockFragment","override lazyinit")
    }


}
